package cn.com.api.service;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import cn.com.api.entity.ApiCar;
import cn.com.api.requestpage.OrderConfirmPage;
import cn.com.api.resultpage.CarOrderPage;

@Service
public interface ApiCarService {
	// 添加到购物车
	public void addCar(Map<String, String> params, Map<String, Object> map);

	// 添加到购物车
	public void addCar2(Map<String, String> params, Map<String, Object> map);

	// 查看购物车
	public void goCar(Map<String, String> params, Map<String, Object> map);

	// 查看购物车
	public void goCarByMap(Map<String, String> params, Map<String, Object> map);

	// 将购物记录更新为已下单状态
	public void updateCarInfo(Map<String, Object> map);

	// 将购物记录更新为已下单状态 --price---正常商品---使用price
	public void updateCar(CarOrderPage carPage) throws Exception;

	// 删除购物车
	public void deleteCar(Integer c_id);

	// 批量删除购物车
	public void deleteAllCar(String c_ids);

	/** 我的订单-根据购物记录查询订单货品的信息 */
	public List<CarOrderPage> searchCarProductsByCids(String car_ids);

	/** 查询我的购物车数量 */
	public void getMyCarCount(Map<String, String> params, Map<String, Object> map);

	/** 根据出入的c_id判断购物记录是否已生成订单 */
	public boolean checkProducts(OrderConfirmPage orderConfirmPage, Map<String, Object> map) throws Exception;

	/** 根据出入的c_id判断购物记录是否已生成订单 */
	public boolean checkProductsCharge(OrderConfirmPage orderConfirmPage, Map<String, Object> map) throws Exception;

	/** 添加到购物车对1元购商品的校验 */
	public boolean checkCarOneGoods(Map<String, String> params, Map<String, Object> map);

	/** 判断日期是否 在营业时间内 */
	public boolean checkSendTime(OrderConfirmPage orderConfirmPage, Map<String, Object> map) throws Exception;

	/** 校验收货地址 */
	public boolean checkOrderAddress(OrderConfirmPage orderConfirmPage, Map<String, Object> map) throws Exception;

	/** 积分兑换-校验积分是否充足 */
	public boolean checkOrderPoints(OrderConfirmPage orderConfirmPage, Map<String, Object> map) throws Exception;

	public ApiCar findApiCarById(Integer car_id);

	// 修改购物车信息
	public void updateCar(ApiCar car);
	
	
	
	
	public Map<String, Object> addBuyCard(ApiCar apiCar);
	public void delCarById(int id);
	public void delAllCarByUserId(final String userId);
	public Map<String, Object> updCarCount(ApiCar apiCar);
	
	public List<Map<String,Object>> seeMycart(String userId);
	
	public List<ApiCar> showMyChose(List<String>list);
	
	public List<ApiCar> getCarInfoByCarIds(List<String> list);
	
	public ApiCar getApiCarByCondition(Map<String,Object> map);
	
	public void removeOverDueGoods(String userId,String currentDate,String currentHour);
	
	public void updateCarStatusByCarId(String carId,String status);
	
	public void updateCardStatusByList(List<String>list,String status);
	
	public void updateCarStatusByUserId(String userId,String status);
	
}
